fix: client authoritative NetworkAnimator skips sending to 2nd player when in server mode#2127
Merged
NoelStephensUnity merged 39 commits intodevelopfrom Sep 28, 2022
Merged
Conversation
сo-authored: Andrei Soprachev <SoprachevAK@users.noreply.github.com>
ShadauxCat
approved these changes
Aug 17, 2022
Looking at the possibility of fixing the multiple trigger issue (i.e. multiple triggers are fired in the same frame on the same network animator that creates multiple transition states.
This is a new approach to synchronizing transitions with late joining players without having to actually set the associated conditional trigger. By building a small list of all states and then building a quick lookup table, we can just synchronize the "transition state" which for late joining clients is a cross fade between the start and destination state. We synchronize the normalized time (where it was in the transition on the server side when the client connected) of the transition this way as well. Now, we just synchronize states (which some can be transition states).
Updated a property name and added some network log warning and error messages.
This was referenced Sep 28, 2022
jakobbbb
pushed a commit
to GooseGirlGames/com.unity.netcode.gameobjects
that referenced
this pull request
Feb 22, 2023
… when in server mode (Unity-Technologies#2127) co-authored-by: Vadim Tsvetkov co-authored-by: Andrei Soprachev * fix: animator syncronization for >2 clients * fix: remove redundant rpc call when host * test This includes coverage for running in server mode only as well as validates the fix where a second client will receive updates. co-authored-by: Noel Stephens - Unity * fix Fixed some additional issues with trigger synchronization. Removed the bool from ProcessAnimationMessageQueue as it was no longer needed. * fix This is a new approach to synchronizing transitions with late joining players without having to actually set the associated conditional trigger. By building a small list of all states and then building a quick lookup table, we can just synchronize the "transition state" which for late joining clients is a cross fade between the start and destination state. We synchronize the normalized time (where it was in the transition on the server side when the client connected) of the transition this way as well. Now, we just synchronize states (which some can be transition states). * test increased number of clients Fixed issue where the late joining client was not being shutdown at the end of the LateJoinSynchronizationTest. * update NetworkAnimator uses ISerializationCallbackReceiver to build its transition to states table for late joining client synchronization when a transition is ocurring. Co-authored-by: Vadim Tsvetkov <florius0@ninsar.pro> Co-authored-by: Andrei Soprachev <soprachev@mail.ru> Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is based off of florius0's user-submitted PR-2115. This resolves the issue where if only two clients were joined the second client would not be updated when running a server and not a host.
MTT-4384
This also pertains to #2114, #2134
Changelog
Testing and Documentation